using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Bounce
{
    public class Basketball : Entity
    {
        public Basketball(Texture2D oTexture, Vector2 vPosition, float fRadius, float fMass)
            : base(vPosition)
        {
            Mass = fMass;
            Radius = fRadius;
            Texture = oTexture;

            Origin = new Vector2(oTexture.Width, oTexture.Height);
            Origin *= 0.5f;
            float fScale = (fRadius * 2) / oTexture.Width;
            Scale = new Vector2(fScale);
            Velocity = new Vector2(0.0f, 0.0f);
            Color = Color.Orange;
        }

        public void Reset(Vector2 oStartPosition)
        {
            Position = oStartPosition;
            PreviousPosition = oStartPosition;
            Rotation = 0.0f;
            Velocity = Vector2.Zero;
            Color = Color.Orange;
        }

        public void Draw(SpriteBatch oSpriteBatch)
        {
            Draw(oSpriteBatch, Texture);
        }

        #region Properties

        public float Radius
        {
            get;
            protected set;
        }

        public float Mass
        {
            get;
            protected set;
        }

        protected Texture2D Texture;

        #endregion

    }
}
